<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

Route::get('api/:v/test/test','api/:v.Test/test');
//http://luyiran.com/api/v1/test/test?id=0.01

Route::get('api/:v/banner/getBanner/:id','api/:v.BannerController/getBanner');
//http://luyiran.com/api/v1/banner/getBanner/1

Route::get('api/:version/theme', 'api/:version.ThemeController/getSimpleList');
//http://luyiran.com/api/v1/theme

//详情
Route::get('api/:version/theme/:id', 'api/:version.ThemeController/getComplexOne');
//http://luyiran.com/api/v1/theme/2
//获取商品
Route::get('api/:version/product', 'api/:version.ProductController/getRecent');
//http://luyiran.com/api/v1/product/9
//获取商品详情
Route::get('api/:version/details/:id', 'api/:version.ProductController/getProductDetails');
//http://luyiran.com/api/v1/details/9

Route::get('api/:version/byCategory/:id', 'api/:version.ProductController/getProductByCategory');
//http://luyiran.com/api/v1/byCategory/9


Route::get('api/:version/products/:id', 'api/:version.Products/get');
//http://luyiran.com/api/v1/products/1

//获取全部分类
Route::get('api/:version/category', 'api/:version.CategoryController/getAllCategory');
//http://luyiran.com/api/v1/category
//获取一个分类
Route::get('api/:version/oneCategory/:id', 'api/:version.CategoryController/getOneCategory');
//

Route::post('api/:version/token','api/:version.TokenController/getToken');
//http://luyiran.com/api/v1/token
Route::post('api/:version/token/verify','api/:version.TokenController/verifyToken');
//http://luyiran.com/api/v1/token/verify




//验证敏感词汇
Route::post('api/:version/checkSensitive','api/:version.TokenController/checkSensitive');
//http://luyiran.com/api/v1/checkSensitive




//地址接口
Route::post('api/:version/address','api/:version.AddressController/createOrUpdateAddress');
//http://luyiran.com/api/v1/address

//获取地址
Route::get('api/:version/address/getaddress','api/:version.AddressController/getUserAddress');
//http://luyiran.com/api/v1/address/getaddress


//订单接口
Route::post('api/:version/order', 'api/:version.OrderController/placeOrder');
//http://luyiran.com/api/v1/orders
Route::get('api/:version/order/by_user', 'api/:version.OrderController/getSummaryByUser');
//http://luyiran.com/api/v1/order/by_user
Route::get('api/:version/order/paginate', 'api/:version.OrderController/ ');
Route::post('api/:version/order/delivery', 'api/:version.OrderController/delivery');





//支付
Route::post('api/:version/pay/pre_order', 'api/:version.PayController/getPreOrder');
//http://luyiran.com/api/v1/pay/pre_order


//微信支付回调
Route::post('api/:version/pay/notify', 'api/:version.PayController/receiveNotify');
//http://luyiran.com/api/v1/pay/notify

Route::get('api/:version/getToken', 'api/:version.TokenController/getToken');
//http://luyiran.com/api/v2/getToken
Route::post('api/:version/token/app', 'api/:version.TokenController/getAppToken');























